import { Layout } from 'ant-design-vue'
import AvatarDropdown from './AvatarDropdown.jsx'
import Notice from './Notice.vue'
import './Header.less'

export default {
  name: 'ProHeader',
  props: {
    fixed: Boolean
  },
  render() {
    const rnodes = []
    rnodes.push(<Notice class="pro-global-header-nav-item" />)
    rnodes.push(<AvatarDropdown class="pro-global-header-nav-item" />)

    const wrapper = []
    wrapper.push(<div class="pro-global-header-nav pro-global-header-nav-right">{ rnodes }</div>)
    return (
      <Layout.Header class={['pro-global-header', { 'pro-global-header-fixed': this.fixed }]}>
        <div class="pro-global-header-wrapper"><div style="flex: 1 1 0%;" />{ wrapper }</div>
      </Layout.Header>
    )
  }
}
